
<body class="m-self-adrs">
<div class="self-address m-msg2"><h4 class="note">请选择线下支付门店地址</h4></div>
<?php if(isset($list)){?>
    <?php foreach($list as $k=>$v){?>
        <dl class="f-cb J_sltAdrs" data-shopid="<?php echo $v['shop_id'];?>">
            <dt>&nbsp;</dt>
            <dd>
                <p><em>线下地址</em><span class="self-addr"><?php echo $v['address'];?></span></p>
                <h6><span>&nbsp;</span><b class="self-mobile"><?php echo $v['mobile'];?></b></h6>
            </dd>
        </dl>
    <?php } ?>
<?php } ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
$(function(){

	var zon = 'z-on',type=<?php if($type){echo $type;}else{echo 0;}?>;
	$('.J_sltAdrs').on('touchend', 'dt', function(evt){

		var _this = $(this);
		if(_this.hasClass(zon)){
			_this.removeClass(zon);
		}else{
			$('.J_sltAdrs').find('dt').removeClass(zon);
			_this.addClass(zon);
		}

		evt.preventDefault();
		return false;
	});

    $('.m-self-adrs').on('touchend', 'dl', function(evt){
        var addr = $(this).find('.self-addr').text();
        var mobile = $(this).find('.self-mobile').text();
        $.post('/web/order/selectself',{addr:addr,mobile:mobile},function(data){
            window.location.href='/web/order/buy';
        },'json')
        evt.preventDefault();
        return false;
    });

});
</script>
